def remainder(x:Int,xs:List[Int]):List[Int]= xs match {
    case Nil=>Nil
    case y::ys=>x%y :: remainder(x,ys)
}
def remainderCurry(x:Int)(y:Int) = x % y

def remainder2(x:Int, xs:List[Int]) =
    xs map (remainderCurry(x)_)

def remainder3(x:Int, xs:List[Int]) =
    xs map ((y) => x % y)


def isPrime(x:Int)= {
    val a=remainder3(x,List.range(2,x))
    (x,checkPrime(a))
}
def checkPrime(xs:List[Int]):Boolean= xs match {
    case Nil=>true
    case y::ys=>if(y==0) false else checkPrime(ys)
} 
val l=List.range(2,10) 

//println(l)
println(l map isPrime)

//def remainderCurry(x:Int)(y:Int) = x % y

def remainder5 = remainderCurry(5)_
def remainder10 = remainderCurry(10)_
//println(remainder10(3))
